home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / SciAn / src / ScianTimers.h < prev    next >
C/C++ Source or Header  |  1994-08-01  |  2KB  |  63 lines

  1. /*ScianTimers.h
  2.   External stuff for timers in scian
  3.   Eric Pepke
  4.   September 9, 1990
  5. */
  6.  
  7. #define NALARMS        30        /*Number of alarms active at once*/
  8.  
  9. typedef struct
  10.     {
  11.     ObjPtr object;            /*The object to kick*/
  12.     NameTyp method;            /*The method to send it*/
  13.     double when;            /*The time to send the method*/
  14.     double startTime;        /*The time to start counting lateness*/
  15.     Bool wallTime;            /*True iff wall time only*/
  16.     } AlarmRec;
  17.  
  18. extern ObjPtr timedObjClass;
  19. extern Bool interpolateP;
  20.  
  21. /*Time format bits for flag*/
  22. #define TF_SUBSECONDS    1        /*Stuff less than a second*/
  23. #define TF_SECONDS    2        /*Seconds*/
  24. #define TF_MINUTES    4        /*Minutes*/
  25. #define TF_HOURS    8        /*Hours*/
  26.  
  27. /*Is timed obj predicate*/
  28. #define IsTimedObj(object) IntVarEql(object, CLASSID, CLASS_TIMEDOBJ)
  29.  
  30. #ifdef PROTO
  31. void InitTimers(void);
  32. void IdleTimers(void);
  33. void KillTimers(void);
  34. void PrintTime(char *s, real t, int f);
  35. Bool WakeMe(ObjPtr, NameTyp, double);
  36. Bool SetTimeout(ObjPtr, NameTyp, double);
  37. void DoNotDisturb(ObjPtr, NameTyp);
  38. double Clock(void);
  39. double WallClock(void);
  40. void SetSystemClock(double);
  41. void ClockOff(void);
  42. void ClockOn(void);
  43. ObjPtr NewTimedObject(ObjPtr, ObjPtr);
  44. ObjPtr NewTimeControl(int, int, int, int, char*);
  45. int ParseTime(real *, int *, char s[]);
  46. #else
  47. void InitTimers();
  48. void IdleTimers();
  49. void KillTimers();
  50. void PrintTime();
  51. Bool WakeMe();
  52. void DoNotDisturb();
  53. double Clock(void);
  54. void SetSystemClock();
  55. void ClockOff();
  56. void ClockOn();
  57. ObjPtr NewTimedObject();
  58. ObjPtr NewClock();
  59. void SetClock();
  60. ObjPtr NewTimeControl();
  61. int ParseTime();
  62. #endif
  63.